1. Field of the Invention
The present invention relates to a communication apparatus, a communication method, and a storage medium therefor, and more particularly, to a SIP communication apparatus, a SIP communication method, and a storage medium therefor.
2. Description of the Related Art
To conduct SIP (session initiation protocol) communication, SIP negotiation is performed between a communication apparatus and a communication counterpart to exchange SDPs (session description protocols) each describing media information that indicates one or more media types. Subsequently, a SIP session for data transmission and reception is established that includes one or more media sessions, which can be transmitted and received by both the communication apparatus and the communication counterpart.
Since IP exchange network fees are charged based on bandwidth usage or the number of media sessions, it is advantageous from the viewpoint of user cost that the communication apparatus capable of handling plural types of media establishes with the communication counterpart a SIP session not including a media session unnecessary for communication, but including only an optimum media session.
To establish a SIP session only including the optimum media session even when the media capability of the communication counterpart is unknown, some conventional communication apparatus capable of handling plural types of media performs the following operations.
First, the communication apparatus transmits to the communication counterpart a SIP session establish request (INVITE message) that includes an offer SDP describing plural pieces of media information. When an error response is sent back from the communication counterpart, the communication apparatus checks an answer SDP included in the error response and transmits to the communication counterpart an INVITE message that includes a SDP describing optimum media information. On the other hand, when a success response is sent back from the communication counterpart, the communication apparatus establishes a SIP session with the communication counterpart by using optimum media described in an answer SDP included in the success response (see, for example, Japanese Laid-open Patent Publication No. 2010-109738).
With the method disclosed in Japanese Laid-open Patent Publication No. 2010-109738, the communication apparatus transmits to the communication counterpart an offer SDP that proposes plural types of media for being used to establish a SIP session with the communication counterpart with reliability, and waits for one media being selected by the counterpart apparatus from among plural media described in the offer SDP. However, depending on the communication counterpart, a response sent back from the communication counterpart sometimes includes an answer SDP describing all the media that can be handled by the communication counterpart among the plural media described in the offer SDP. Even in such a case, the communication apparatus is required to handle all the media described in the answer SDP, as optimum media. As a result, a SIP session including an unnecessary media session is established, so that undesired IP exchange network fees will be charged. In addition, the communication apparatus wastefully consumes its resources such as a port, socket, and memory for the unnecessary media session.